home *** CD-ROM | disk | FTP | other *** search
- head 1.9;
- branch ;
- access ;
- symbols ;
- locks ; strict;
- comment @@;
-
-
- 1.9
- date 92.06.10.13.04.45; author jhh; state Exp;
- branches ;
- next 1.8;
-
- 1.8
- date 91.04.11.12.53.35; author kupfer; state Exp;
- branches ;
- next 1.7;
-
- 1.7
- date 89.10.09.21.28.40; author rab; state Exp;
- branches ;
- next 1.6;
-
- 1.6
- date 89.08.18.11.21.52; author douglis; state Exp;
- branches ;
- next 1.5;
-
- 1.5
- date 89.08.17.11.16.14; author douglis; state Exp;
- branches ;
- next 1.4;
-
- 1.4
- date 89.04.06.21.40.41; author jhh; state Exp;
- branches ;
- next 1.3;
-
- 1.3
- date 88.11.27.16.28.54; author ouster; state Exp;
- branches ;
- next 1.2;
-
- 1.2
- date 88.10.13.10.08.59; author ouster; state Exp;
- branches ;
- next 1.1;
-
- 1.1
- date 88.09.01.15.34.02; author ouster; state Exp;
- branches ;
- next ;
-
-
- desc
- @@
-
-
- 1.9
- log
- @make sure all makefiles include TYPE
- @
- text
- @#!/sprite/cmds/csh -f
- #
- # A script to generate (or regenerate) a Makefile for one subdirectory
- # of a command whose sources are spread across many subdirectories.
- #
- # This script is invoked from mkmf. See the mkmf manual page for
- # details on how mkmf works.
- #
- # Parameters passed in from mkmf as environment variables:
- # DOMACHINES names of machines we are supposed to run mkmf on
- # MKMFDIR directory containing prototype makefiles
- # MKMFFLAGS arguments to all mkmfs run recursively
- # MACHINES list of machine names (e.g. "sun2 sun3"), for
- # which there are machine-specific subdirectories
- # (sun2.md, sun3.md) to hold the object files and
- # any machine-specific source files to use when
- # compiling for that machine
- # MAKEFILE name of makefile to create
- # SUBTYPE information about the type makefile
- #
- # Several of these environment variables must be copied to local shell
- # variables before use, because shell variables can be used in some places
- # where environment variables can't.
- #
- # $Header: /sprite/lib/mkmf/RCS/mkmf.bigcmd,v 1.8 91/04/11 12:53:35 kupfer Exp Locker: jhh $ (SPRITE) Berkeley
- #
-
- #
- # Argument processing. (Generalized form, even though just one flag so far.)
- #
- while ($#argv >= 1)
- if ("$1" == '-x') then
- set echo
- endif
- shift
- end
-
- set subtype=$SUBTYPE
- set module=$cwd:t
- set pref='[a-z_A-Z]'
- set machines=($MACHINES)
- set domachines = ($DOMACHINES)
- set makefile=$MAKEFILE
- set distdir=($DISTDIR)
- if (-e $makefile.proto) then
- set proto=$makefile.proto
- else
- set proto="${MKMFDIR}/Makefile.bigcmd"
- endif
-
- echo "Generating $makefile for module $module from $proto"
-
- set nonomatch
- set allSrcs =( ${pref}*.[cylsp] )
- #
- # Check to see if there were any sources. The first check (size == 1)
- # is only necessary because the second check will cause an error if
- # allSrcs contains more than 1024 bytes.
- #
- if ($#allSrcs == 1) then
- if ("$allSrcs" == "${pref}*.[cylsp]") set allSrcs=()
- endif
- set mdsrcs =( *.md/${pref}*.[cylsp] )
- if ($#mdsrcs == 1) then
- if ("$mdsrcs" == "*.md/${pref}*.[cylsp]") set mdsrcs=()
- endif
- set allSrcs=($allSrcs $mdsrcs)
- unset nonomatch
-
- #
- # Use sed to substitute various interesting things into the prototype
- # makefile. The code below is a bit tricky because some of the variables
- # being substituted in can be very long: if the substitution is passed
- # to sed with "-e", the entire variable must fit in a single shell argument,
- # with a limit of 1024 characters. By generating a separate script file
- # for the very long variables, the variables get passed through (to the
- # script file) as many arguments, which gets around the length problem.
- #
-
- rm -f mkmf.tmp.sed
- echo s,"@@(ALLSRCS)",$allSrcs,g > mkmf.tmp.sed
- cat $proto | sed -f mkmf.tmp.sed \
- -e "s,@@(DATE),`date`,g" \
- -e "s,@@(MACHINES),$machines,g" \
- -e "s,@@(MAKEFILE),$makefile,g" \
- -e "s,@@(NAME),$module,g" \
- -e "s,@@(TEMPLATE),$proto,g" \
- -e "s,@@(DISTDIR),$distdir,g" \
- -e "s,@@(TYPE),$subtype,g" \
- > $makefile
- rm -f mkmf.tmp.sed
-
- setenv PARENTDIR $cwd
- foreach i ($domachines)
- (cd $i.md; mkmf $MKMFFLAGS -f md.mk; mv md.mk md.mk.tmp; sed -e "s| $i\.md/linked\.o||g" md.mk.tmp > md.mk; rm -f md.mk.tmp)
- end
- @
-
-
- 1.8
- log
- @Flush DEFTARGET: the default target is now determined by a pmake
- library file.
- @
- text
- @d19 1
- d25 1
- a25 1
- # $Header: /sprite/lib/mkmf/RCS/mkmf.bigcmd,v 1.7 89/10/09 21:28:40 rab Exp Locker: kupfer $ (SPRITE) Berkeley
- d38 1
- d89 1
- @
-
-
- 1.7
- log
- @Modifications for distribution.
- @
- text
- @a9 1
- # DEFTARGET name of default target
- d24 1
- a24 1
- # $Header: /sprite/lib/mkmf/RCS/mkmf.bigcmd,v 1.6 89/08/18 11:21:52 douglis Exp Locker: rab $ (SPRITE) Berkeley
- a41 1
- set defTarget=($DEFTARGET)
- a81 1
- -e "s,@@(DEFTARGET),${defTarget:q},g" \
- @
-
-
- 1.6
- log
- @another change for TM -- use single machine if it exists, else \ds3100
- @
- text
- @d25 1
- a25 1
- # $Header: /sprite/lib/mkmf/RCS/mkmf.bigcmd,v 1.4 89/04/06 21:40:41 jhh Exp Locker: douglis $ (SPRITE) Berkeley
- d44 1
- a44 1
-
- d89 1
- @
-
-
- 1.5
- log
- @removed DEFTARGET -- we use $MACHINE now
- @
- text
- @d10 1
- d43 1
- d84 1
- @
-
-
- 1.4
- log
- @added abilty to make specific machine types
- @
- text
- @a9 1
- # DEFTARGET name of default target
- d24 1
- a24 1
- # $Header: /sprite/lib/mkmf/RCS/mkmf.bigcmd,v 1.3 88/11/27 16:28:54 ouster Exp $ (SPRITE) Berkeley
- a41 1
- set defTarget=($DEFTARGET)
- a81 1
- -e "s,@@(DEFTARGET),$defTarget,g" \
- @
-
-
- 1.3
- log
- @Various changes to replace old C library entirely with new C library.
- @
- text
- @d10 2
- d25 1
- a25 1
- # $Header: /sprite/lib/mkmf/RCS/mkmf.bigcmd,v 1.2 88/10/13 10:08:59 ouster Exp $ (SPRITE) Berkeley
- d41 1
- d43 1
- a52 6
- if (" $machines " =~ *\ sun3\ *) then
- set defTarget=sun3
- else
- set defTarget=$machines[1]
- endif
-
- d92 2
- a93 1
- foreach i ($machines)
- @
-
-
- 1.2
- log
- @Must removed "linked.o" from OBJ list to prevent circular pmake
- dependency.
- @
- text
- @d18 4
- d23 1
- a23 8
- # Variables generated here:
- # module module to create (directories are assumed to be named
- # after the modules they create)
- # pref prefix pattern that files must match to be included
- # makefile name of the makefile to create
- # proto name of prototype makefile to use to create $makefile
- # machines variable equivalent to MACHINES; needed because env
- # variables can't always be used where variables can.
- a24 2
- # $Header: /sprite/lib/mkmf/RCS/mkmf.bigcmd,v 1.1 88/09/01 15:34:02 ouster Exp Locker: ouster $ (SPRITE) Berkeley
- #
- d85 2
- a86 1
- -e "s,@@(MODULE),$module,g" \
- a87 1
- -e "s,@@(DEFTARGET),$defTarget,g" \
- d89 1
- a90 1
- -e "s,@@(DATE),`date`,g" \
- @
-
-
- 1.1
- log
- @Initial revision
- @
- text
- @d28 1
- a28 1
- # $Header: mkmf.kernel,v 1.13 88/08/12 14:38:25 ouster Exp $ (SPRITE) Berkeley
- d100 1
- a100 1
- (cd $i.md; mkmf $MKMFFLAGS -f md.mk)
- @
-